 <!DOCTYPE html>
 <html>
     <head>
         <Link Rel="SHORTCUT ICON" href="http://www.jd.com/favicon.ico">
         <title>{{$conf -> wz_title}} | {{$title}}</title>
         <meta name="_token" content="{{ csrf_token() }}"/>
         <meta charset="utf-8" />
         <link href="{{asset('/home/css/index.css')}}" rel="stylesheet"/>
         <link href="{{asset('/home/css/public.css')}}" rel="stylesheet"/>
         <style type="text/css">
        
            #root-nav{width:100%;height:45px;background:#f2f2f2;}
            #root-nav div.root-w{width:1210px;height:45px;margin:0px auto;line-height:45px;}
            #root-nav div.root-w strong a{font-size:20px;}
            
            #p-box{width:1349px;height:450px;}
            #p-box div.p-w{width:1210px;height:450px;margin:0px auto;background:#fff;border-bottom:1px solid #f2f2f2;}
            #p-box div.p-w > div{float:left;}
            /*===================商品图片浏览=======================*/
            /* #p-box div.p-w div.preview{width:378px;height:450px;}*/
            #p-box div.p-w div.preview{width:350px;height:450px;}
            #p-box div.p-w div.preview div.preview-bimg{width:350px;height:350px;cursor:pointer;position:relative;}
            #p-box div.p-w div.preview div.preview-bimg div.magnify{width:350px;height:350px;background:red;position:absolute;top:0px;left:350px;}
            
            #p-box div.p-w div.preview div.preview-simg{width:350px;height:54px;}
            #p-box div.p-w div.preview div.preview-simg ul li{width:50px;height:50px;float:left;margin:4px 10px;cursor:pointer;}
            #p-box div.p-w div.preview div.preview-n{width:350px;height:40px;background:#fff;line-height:60px;}
            #p-box div.p-w div.preview div.preview-n div.p-share{width:160px;height:40px;float:right;}
            #p-box div.p-w div.preview div.preview-n div.p-share a{margin:0px 10px;}
            
            #p-box div.p-w div.p-inner{width:588px;height:450px;}
            #name{width:588px;height:100px;}
            #name span{display:block;width:560px;height:50px;line-height:50px;margin:0px auto;}
            
            #summary{width:588px;height:100px;}
            #summary div.price{width:560px;height:50px;margin:0px auto;line-height:50px;}
            #summary div.price span{font-size:25px;color:#e4393c;}
            #summary div.price div.totalp{width:70px;height:40px;float:right;line-height:20px;margin-top:10px;}
            #summary div.activity{width:560px;height:50px;margin:0px auto;line-height:50px;}
            
            #choose{width:588px;height:456px;}
            #choose div.address{width:560px;height:80px;margin:0px auto;}
            #choose div.address > div{width:560px;height:40px;line-height:40px;}
            #choose div.attr{width:560px;height:140px;margin:0px auto;}
            #choose div.attr > div{width:560px;height:70px;line-height:70px;}
            #choose div.attr div.attr-color > div{float:left;}
            #choose div.attr div.attr-color div.c-color {width:70px;height:70px;}
            #choose div.attr div.attr-color div.color {width:490px;height:70px;}
            #choose div.attr div.attr-color div.color > label{width:50px;height:30px;border:1px solid #ccc;float:left;padding-left:20px;margin-top:20px;line-height:30px;margin-right:10px;text-align:center;cursor:pointer;}
            #choose div.attr div.attr-color div.color > label input{visibility:hidden;width:0;height:0;margin:0;padding:0;}
            #choose div.num{width:560px;height:60px;margin:20px auto;}
            #choose div.num div.p-num{width:60px;height:40px;background:#fff;position:relative;}
            #choose div.num div.p-num input{width:40px;height:40px;border:0px;text-indent:8px;border:1px solid #bbb;;}
            #choose div.num div.p-num div.add-desc{width:20px;height:40px;position:absolute;top:0px;left:40px;}
            #choose div.num div.p-num div.add-desc a{border:1px solid #bbb;display:block;width:20px;height:20px;background:#ddd;line-height:20px;text-align:center;font-size:15px;text-decoration:none;}
            #choose div.num div.p-num a.add-car{border:1px solid #e4393c;display:block;width:150px;height:40px;background:#e4393c;line-height:40px;text-align:center;font-size:20px;text-decoration:none;
                                                position:absolute;top:0px;left:100px;color:#fff;border-radius:5px;
                                            }
            #choose div.num div.p-num a.add-car:hover{background:#f9393c;}
            #choose div.tip{width:560px height:60px;margin:0px auto;}
            
            /*=============商品介绍===商品评价=====规格参数========= ... ================================*/
            #all-details{width:1210px;margin:10px auto;}
            #all-details > div{float:left;}
            #aleft{width:210px;border:1px solid #bbb;}
            #mc div.mt{width:210px;height:32px;line-height:32px;text-indent:10px;}
            #mc div.mtgoods{width:210px;overflow:hidden;}
            #mc div.mtgoods div.p-goods{width:190px;height:254px;margin:10px 10px 0px 10px;padding-bottom:5px;}
            
            #mc div.mtgoods div.p-goods div.p-img{width:190px;height:190px;}
            #mc div.mtgoods div.p-goods div.p-name{width:190px;height:30px;background:#fff;text-indent:10px;overflow:hidden;}
            #mc div.mtgoods div.p-goods div.p-name a{display:block;width:190px;height:30px;line-height:30px;overflow:hidden;}
            #mc div.mtgoods div.p-goods div.p-price{width:190px;height:17px;background:#fff;text-indent:10px;overflow:hidden;line-height:16px;}
            #mc div.mtgoods div.p-goods div.p-review{width:190px;height:17px;background:#fff;text-indent:10px;overflow:hidden;line-height:16px;}
            

            #aright{width:990px;margin-left:6px;overflow:hidden}
            #aright div.nav{width:990px;height:40px;background:#f2f2f2;border:1px solid #ddd;border-top:3px solid #e4393c;}
            #aright div.nav ul li a{display:block;width:120px;height:40px;float:left;line-height:40px;text-align:center;margin-top:-3px;margin-right:3px;border-top:3px solid #e4393c;}
            #aright div.content{width:990px;position:relative;margin-top:10px;overflow:hidden}
            #aright div.content div.g-d{display:block;width:988px;position:relative;border:1px solid #bbb;z-index:999;}
            #aright div.content div.g-p{background:#f2f2f2;overflow:hidden;display:none;width:990px;height:2818px;position:relative;top:0px;left:0px;z-index:999;border:1px solid #fff;}
            #aright div.content div.g-p div.g-p-nav{width:990px;height:30px;border:1px solid #ddd;background:#f2f2f2}
            #aright div.content div.g-p div.g-p-nav ul li{float:left}
            #aright div.content div.g-p div.g-p-nav ul li a{display:block;width:120px;height:30px;float:left;line-height:30px;text-align:center;}
            
          
            
            /*============= rate 好评率 ==================*/       
            #rate{width:990px;height:120px;margin-top:10px;}
            #rate > div{float:left;}
            #rate div.mc{width:200px;height:120px;font-size:80px;margin-left:10px;line-height:120px;text-align:center;color:#e4393c;}
            #rate div.mt{width:500px;height:120px;margin-left:10px;margin-top:10px;}
            #rate div.mt div.mt-g{width:500px;height:30px;margin-left:10px;margin-top:5px;}
            #rate div.mt div.mt-g div.mt-k{width:100px;height:30px;float:left;line-height:30px;text-indent:20px;}
            #rate div.mt div.mt-g div.mt-h{width:380px;height:15px;background:#ddd;float:right;margin:5px 0px;}
            #rate div.mt div.mt-g div.mt-h div.mt-h-q{width:320px;height:15px;background:#e4393c;}
            #rate div.mt div.mt-g div.mt-h div.mt-h-w{width:30px;height:15px;background:#e4393c;}
            #rate div.mt div.mt-g div.mt-h div.mt-h-e{width:30px;height:15px;background:#e4393c;}
          

            
            /*=============================================*/
            #g-p-content{width:990px;position:relative;}
            #g-p-content div.w{width:990px;height:30px;background:#f2f2f2;margin-top:-1px;border:1px solid #ddd;}
            #g-p-content div.w > div{float:left;line-height:30px;text-align:center;}
            #g-p-content div.w div.w-message{width:500px;height:30px;}
            #g-p-content div.w div.w-degree{width:160px;height:30px;}
            #g-p-content div.w div.w-cof{width:160px;height:30px;}
            #g-p-content div.w div.w-user{width:170px;height:30px;}

            /*=============全部评价===================*/
            #g-p-content div.all-p{background:#fff;display:block;width:990px;height:2755px;position:absolute;top:30px;left:0px;}
            .all-p-details{width:960px;height:140px;margin:0px auto;}
            .all-p-details > div{float:left;}
            .all-p-details div.a-p-x{width:500px;height:120px;margin-top:15px;}
            .all-p-details div.a-p-x ul li:nth-child(1){width:500px;height:60px;line-height:25px;word-break:break-all;font-size:14px;color:#555;}
            .all-p-details div.a-p-x ul li:nth-child(2){width:500px;height:25px;line-height:25px;}
            .all-p-details div.a-p-x ul li:nth-child(3){width:500px;height:25px;line-height:25px;}
            .all-p-details div.a-p-d{width:100px;height:20px;margin-top:50px;margin-left:20px;}
            .all-p-details div.a-p-d ul li{width:13px;height:13px;float:left;margin:3px 3px;}
            .all-p-details div.a-p-m{width:80px;height:60px;margin-top:40px;margin-left:70px; line-height:30px;}
            .all-p-details div.a-p-u{width:100px;height:100px;margin-top:20px;float:right;line-height:30px;}

            
            /*=========评论回复==========*/
            
            .review_box{display:none;width:960px;height:147px;background:#cdcdcd;margin-bottom:-10px;}
            .review_box2{cursor:pointer;width:120px;height:35px;background:#e4393c;float:right;margin-right:20px;line-height:35px;text-align:center;color:#fff;font-size:18px;border:1px solid #e4393c}
            /*显示所有的回复*/
            .all-review{width:960px;background:#f2f2f2;}
            .all-review ul li{width:940px;height:100px;margin-left:10px;}
            .all-review ul li div.top{width:940px;height:60px;margin-top:10px;}
            .all-review ul li div.bottom-btn{cursor:pointer;background:#e4393c;color:#fff;width:50px;height:20px;line-height:20px;text-align:center;font-size:12px;}
            
            
            /*====回复====*/
            
            
            
            /*=============好评===================*/
            #g-p-content div.good-p{background:#fff;display:block;width:990px;height:2755px;position:absolute;top:30px;left:0px;}
            
            /*=============中评===================*/     
            #g-p-content div.mid-p{background:#fff;display:block;width:990px;height:2755px;position:absolute;top:30px;left:0px;}
            
            /*=============差评===================*/     
            #g-p-content div.bad-p{background:#fff;display:block;width:990px;height:2755px;position:absolute;top:30px;left:0px;}
        
            .a_page{width:990px;height:25px;border:1px solid #fff;position:absolute;bottom:0px;block;background:#fff;}
            .a_page ul li {width:50px;height:25px;border:1px solid #bbb;background:#e4393c;float:left;line-height:25px;text-align:center;color:#fff;}
            .a_page ul li a{width:50px;height:25px;display:block;background:#f2f2f2}
            .w_page{width:990px;height:25px;border:1px solid #fff;position:absolute;bottom:0px;block;background:#fff;}
            .w_page ul li {width:50px;height:25px;border:1px solid #bbb;background:#e4393c;float:left;line-height:25px;text-align:center;color:#fff;}
            .w_page ul li a{width:50px;height:25px;display:block;background:#f2f2f2}
            .m_page{width:990px;height:25px;border:1px solid #fff;position:absolute;bottom:0px;block;background:#fff;}
            .m_page ul li {width:50px;height:25px;border:1px solid #bbb;background:#e4393c;float:left;line-height:25px;text-align:center;color:#fff;}
            .m_page ul li a{width:50px;height:25px;display:block;background:#f2f2f2}
            .b_page{width:990px;height:25px;border:1px solid #fff;position:absolute;bottom:0px;block;background:#fff;}
            .b_page ul li {width:50px;height:25px;border:1px solid #bbb;background:#e4393c;float:left;line-height:25px;text-align:center;color:#fff;}
            .b_page ul li a{width:50px;height:25px;display:block;background:#f2f2f2}
            
            /*   放大镜      */
            .bigImg{
                display: none;
                width: 400px;
                height: 400px;
                overflow: hidden;
                position: absolute;
                z-index: 100;
                left: 420px;
                float: left;
                border: 1px solid #ccc;
            }

            a:hover{
                color: #B1191A;
            }
         </style>
         <script src="{{asset('/home/js/jquery.js')}}"></script>
         <script src="{{asset('/home/js/plug.js')}}"></script>
         <script src="{{asset('/home/js/index.js')}}"></script>
     </head>
     <body>
        <!--顶部快捷方式 START-->
        <div id="shortcut">
            <div class="w">
                <ul class="sendto">
                    <li>
                        <div class="send-target">
                            送至：<span>北京</span>
                            <i><span>◇</span></i>
                        </div>
                        <!--城市列表 START-->
                        <div class="send-list">
                            <div></div>
                            <ul class='sendcity'>
                                <li><a href="#none" data-id="01">北京</a></li> 
                                <li><a href="#none" data-id="02">上海</a></li> 
                                <li><a href="#none" data-id="03">天津</a></li> 
                                <li><a href="#none" data-id="04">重庆</a></li> 
                                <li><a href="#none" data-id="05">河北</a></li> 
                                <li><a href="#none" data-id="06">山西</a></li> 
                                <li><a href="#none" data-id="07">河南</a></li> 
                                <li><a href="#none" data-id="08">辽宁</a></li> 
                                <li><a href="#none" data-id="09">吉林</a></li> 
                                <li><a href="#none" data-id="10">江苏</a></li> 
                                <li><a href="#none" data-id="11">山东</a></li> 
                                <li><a href="#none" data-id="12">安徽</a></li> 
                                <li><a href="#none" data-id="13">浙江</a></li> 
                                <li><a href="#none" data-id="14">福建</a></li> 
                                <li><a href="#none" data-id="15">湖北</a></li> 
                                <li><a href="#none" data-id="16">湖南</a></li> 
                                <li><a href="#none" data-id="17">广东</a></li> 
                                <li><a href="#none" data-id="18">广西</a></li> 
                                <li><a href="#none" data-id="19">江西</a></li> 
                                <li><a href="#none" data-id="20">四川</a></li> 
                                <li><a href="#none" data-id="21">海南</a></li> 
                                <li><a href="#none" data-id="22">贵州</a></li> 
                                <li><a href="#none" data-id="23">云南</a></li> 
                                <li><a href="#none" data-id="24">西藏</a></li> 
                                <li><a href="#none" data-id="25">陕西</a></li> 
                                <li><a href="#none" data-id="26">甘肃</a></li> 
                                <li><a href="#none" data-id="27">青海</a></li> 
                                <li><a href="#none" data-id="28">宁夏</a></li> 
                                <li><a href="#none" data-id="29">新疆</a></li> 
                                <li><a href="#none" data-id="30">台湾</a></li> 
                                <li><a href="#none" data-id="31">香港</a></li> 
                                <li><a href="#none" data-id="32">澳门</a></li> 
                                <li><a href="#none" data-id="33">钓鱼岛</a></li>
                                <li><a href="#none" data-id="34">黑龙江</a></li> 
                                <li><a href="#none" data-id="35">内蒙古</a></li>  
                                <li><a href="#none" data-id="36">海外</a></li> 
                            </ul>
                        </div><!--城市列表 END-->
                    </li>
                </ul>
                <!--快捷菜单 START-->
                <ul class="short-menu" style="float: right">
                    <li>
                        
                        @if(!empty($user -> username))
                        <a href="/user">{{$user -> username}}</a>
                        <a href="/login/logout">退出</a>
                        @else
                        <a href="/login">登录</a>
                        <a href="/home/reg/add">快速注册</a>
                        @endif
                    </li>
                    <li class="spacer"></li>
                    <li>
                        @if(!empty($user -> id))
                        <a href="/dingdan">我的订单</a>
                        @else
                        <a href="/login">我的订单</a>
                        @endif
                    </li>
                    <li class="spacer"></li>
                    <li>
                        <a href="/user" class="short-user">我的京东</a>
                        <div class="shortuser">
                            <div class="u-spacer"></div>
                            <div class="shortinfo">
                                <div class="u-pic">
                                @if(!empty($user -> pic))
                                    <a href="/user"><img src="{{$user -> pic}}" alt="" /></a>
                                @else
                                <a href="/login"><img src="{{asset('/uploads/user/1.jpg')}}" alt="" /></a>
                                @endif
                                </div>
                                <div class="u-name">
                                @if(!empty($user -> username))
                                <a href="/user">{{$user -> username}}</a>
                                @else
                                <a href="/login">您好,请先登录!</a>
                                @endif
                                </div>
                                <div class="u-ext">
                                    @if(!empty($user -> username))
                                    <a href="/cart">购物车</a> | <a href="#">消息 <span style="color:red">0</span></a>
                                    @else
                                    <a href="/login">购物车</a> | <a href="#">消息 <span style="color:red">0</span></a>
                                    @endif
                                </div>
                            </div>
                        </div>
                    </li>
                    <li class="spacer"></li>
                    <li>
                        <a href="javascript:;">手机京东</a>
                    </li>
                    <li class="spacer"></li>
                    <li>
                        <a href="javascript:;">关注京东</a>
                    </li>
                    <li class="spacer"></li>
                    <li>
                        <a href="javascript:;">关注会员</a>
                    </li>
                    <li class="spacer"></li>
                    <li>
                        <a href="javascript:;">客户服务</a>
                    </li>
                </ul><!--快捷菜单 END-->
            </div>
        </div><!--顶部快捷方式 END-->

        <!--顶部BANNER START-->
        <!-- <div id="top-banner">
            <div class="w">
                <a><img src="{{asset('/uploads/images/top-banner.jpg')}}" /></a>
            </div>
        </div><!--顶部BANNER END-->
        <!--搜索块 START-->
        <div id="search" class="w">
            <!--LOGO START-->
            <div class="shop-logo">
                <a href="/"><img src="{{asset('/home/images/shop-logo.png')}}" /></a>
            </div><!--LOGO END-->
            <!--搜索框 START-->
            <div class="shop-search">
                <div class="search-form">
                    <form action="/cshow" method="get">
                        <input type="text" name="keyword" value="{{$request['keyword'] or ''}}" />
                        <button type="submit">搜索</button>
                    </form>
                </div>
            </div><!--搜索框 END-->
            <!--购物车 START-->
            <div class="shop-cart">
                <div class="sc-icons">
                    <i class="ci-left"></i>
                    <i class="ci-right">></i>
                    
                    
                   
                    <a href="/cart" target="_blank">我的购物车</a>
                </div>
                    <!-- <img src="/home/images/11.png" alt=""> -->
                
            </div><!--购物车 END-->
             <!--热搜关键词 START-->
            <div class="shop-hotwords">
                <a href="/cshow/太阳镜">太阳镜</a>
                <a href="/cshow/短裤">短裤</a>
                <a href="/cshow/T恤">T恤</a>
                <a href="/cshow/男装">男装</a>
                <a href="/cshow/吊带">吊带</a>
                <a href="/cshow/女鞋">女鞋</a>
                <a href="/cshow/精品">精品</a>
                <a href="/cshow/亲子">亲子</a>
                <a href="/cshow/凉鞋">凉鞋</a>
            </div><!--热搜关键词 END-->
        </div><!--搜索块 END-->
        <!--导航 START-->
        <div id="nav">
            <div class="w">
                <div id="categorys">
                    <div class="dt">
                        <a href="/gshow">全部商品分类</a>
                    </div>
                    <!--{begin 主类-->
                    <div class="dd" style="display: none;margin-top:-1px; ">    
                    @foreach($type as $k => $v)
                            <div class="dd-list">
                                <div class="dd-items">
                                    <h3><a target="_blank" href="/cshow/{{$v -> id}}">{{$v -> catename}}</a>
                                    @if(count($typechilds[$k])>=2)
                                        @for($i=0;$i < 2;$i++)
                                            <a target="_blank" href="/cshow/{{$typechilds[$k][$i] -> id}}">{{$typechilds[$k][$i] -> catename}}</a>
                                        @endfor
                                    @endif
                                    </h3><i>></i>
                                </div>
                                <!--{begin 子类模块-->
                                <div class="dd-content">
                                    <ul class="pop-list">
                                    @foreach($typechilds[$k] as $cate)
                                            <li><a target="_blank" href="/cshow/{{$cate -> id}}">{{$cate -> catename}}</a></li>
                                    @endforeach
                                    </ul>
                                    <ul class="brand-list">
                                    @foreach($brands as $brand)
                                        @if(($brand -> cate_id) == ($v -> id))
                                            <li><a style="display:none" href="__APP__/List/index/brandid/{$brands[$type['id']]['id'][$i]}"></a><a href="/bshow/{{$brand -> brandname}}"><img width="70" src="{{$brand -> brandlogo}}" alt="" /></a></li>
                                        @endif
                                    @endforeach
                                    </ul>
                                </div><!--}end 子类模块-->
                            </div>
                    @endforeach
                    </div><!--}end 主类-->
                </div>
                <div id="navitems">
                    <ul>
                        <volist name="typeIndex" id="type">                           
                                @foreach($type as $val)
                                    <li><a href="/cshow/{{$val -> id}}">{{$val -> catename}}</a></li>
                                @endforeach
                        </volist>
                    </ul>
                </div>
                <div id="treasure">
                    <a href="javascript:;"><img src="{{asset('/uploads/images/nav-treasure.jpg')}}" alt="" /></a>
                </div>
            </div>
        </div><!--导航 END-->
        <div id="root-nav">
        <div class="root-w">
            
                <eq name="i" value="0">
                <strong>
                    <a href="/cshow/{{$catename['cate'][0]}}">{{$catename['cate'][1]}}</a>　>　
                </strong>
                <else />
                <span>
                    <a href="/cshow/{{$catename['precate'][0]}}">{{$catename['precate'][1]}}</a>　>　
                </span>
                </eq>
            
        </div>
        </div>
        <div id="p-box">
            <div class="p-w">
                <div class="preview">
                    <div class="preview-bimg">
                        <img src="{{$goods -> goods_pic}}" width="330" height="350">
                    </div>
                    <div class="preview-simg">
                        <!-- <ul>
                            <li><img class="turn-img" src="__PUBLIC__/index/images/557d44f6N90721ac4.jpg"></li>
                            <li><img class="turn-img" src="__PUBLIC__/index/images/557d44f3N9c2280ab_004.jpg"></li>
                            <li><img class="turn-img" src="__PUBLIC__/index/images/552778b4N6beeb13c.jpg"></li>
                            <li><img class="turn-img" src="__PUBLIC__/index/images/552778b8N1228e677.jpg"></li>
                            <li><img class="turn-img" src="__PUBLIC__/index/images/552778b9Nde2a5a2e.jpg"></li>
                        </ul> -->
                    </div>
                    <div class="preview-n">
                        商品编号<span>　{{$goods -> goods_num}}</span>
                        <div class="p-share">
                            <a href="#"><img src="{{asset('/home/images/20130725.png')}}"> 分享</a>
                            <lable ><a href="/collect/{{$goods -> id}}" class="abc"><img src="{{asset('/home/images/20130725.png')}}"> 关注商品</a></lable>
                        </div>
                    </div>
                </div>
                <div class="bigImg">
                    <img src="{{$goods -> goods_pic}}" />
                </div>
                <div class="p-inner">
                <form action="/cart_insert" name="form1" method="post">
                    {{ csrf_field() }}
                    <div id="name">
                        <input type="hidden" value="{{$goods -> id}}" name="goods_id" class="goods_id"/>
                        <input type="hidden" value="{{$goods -> goods_name}}" name="goods_name" class="goods_name"/>
                        <span><h2>{{$goods -> goods_name}}</h2></span>
                    </div>
                    <div id="summary">
                        <div class="price">京东价：<span>￥ {{$goods -> price}}</span>　<a href="#">(降价通知)</a>
                            
                            <div class="totalp"><p>累计评价</p>{{count($comment)}}<p><a style="color:#005ea4" href="#"></a></p></div>
                            
                        </div>
                        <div class="activity">
                            <p>月销量：{{$goods -> sellnum}}　　　库存量：<span id="stock">{{$goods -> num}}</span></p>
                        </div>
                    
                    </div>
                    <div id="choose">
                            <div class="attr">
                                
                                <div class="attr-color">
                                    <div class="c-color">选择颜色：</div>
                                    <div class="color color_value">
                                        @foreach($goods -> color as $color) 
                                            <label for="color{{$color}}" class="c-c"><input style="margin-left:-30px;" id="color{{$color}}" value="{{$color}}" type="radio" name="color"/>{{$color}}</label>
                                        @endforeach
                                    </div>
                                </div>
                                <div class="attr-color">
                                    <div class="c-color">选择尺码：</div>
                                    <div class="color size_value">
                                        @foreach($goods -> size as $size)
                                            <label for="color{{$size}}" class="c-c"><input style="margin-left:-30px;" value="{{$size}}" id="color{{$size}}" type="radio" name="size"/>{{$size}}</label>
                                        @endforeach
                                    </div>
                                </div>
                                
                            </div>
                            <div class="num">
                                <div class="p-num">
                                    <input type="text" class="buy-num" name="num" value="1">
                                    <div class="add-desc">
                                        <a class="add" href="javascript:">+</a>
                                        <a class="desc" href="javascript:">-</a>
                                    </div>
                                    <a class="add-car" href="javascript:document.form1.submit();"><b>加入购物车</b></a>
                                </div>
                            </div>
                    </div>
                </form>
                </div>
                <!-- <div id="review_area">
                    <div>品牌LOGO</div>
                    <div></div>
                    <div></div>
                </div> -->
            </div>
        </div>
        <div id="all-details">
            <div id="aleft">
            @if(empty($tjgoods))
                <strong style="display: block;margin: 50px auto;width: 120px;">没有搜索到相关商品...</strong>
            @else
                <div id="mc">
                    <div class="mt"><h3>热销推荐：</h3></div>
                    <div class="mtgoods">
                    @foreach($tjgoods as $k => $tjval)
                        @if($k < 6)
                            <div class="p-goods">
                                <div class="p-img"><a target="_blank" href="/detail/{{$tjval -> id}}"><img width="180" height="190" src="{{$tjval -> goods_pic}}"></a></div>
                                <div class="p-name"><a target="_blank" href="/detail/{{$tjval -> id}}">{{$tjval -> goods_name}}</a></div>
                                <div class="p-price"><span style="color:#e4393c;font-size:15px;"><b>{{$tjval -> price}}</b></span></div>
                                <div class="p-review"><span>共有 <a href="#">{{$tjval -> num}}</a> 个评价</span></div>
                            </div>
                        @endif
                    @endforeach   
                    </div>
                </div>
            @endif
            </div>
            <div id="aright">
                <div class="nav">
                    <ul>
                        <li><a style="background:#e4393c;color:#fff" href="javascript:" class="ana goods-d">商品详情</a></li>
                    
                        <li><a href="javascript:" class="ana goods-p">商品评价({{count($comment)}})</a></li>
                        
                    </ul>
                </div>
                <!--好评率-->
                <div id="rate">
                    <div class="mc">
                        <span>0%</span>
                    </div>
                    <div class="mt">
                        <div class="mt-g">
                            <div class="mt-k">好评(<span class="rate_w">0</span>%)</div>
                            <div class="mt-h"><div class="mt-h-q"></div></div>
                        </div>
                        
                        <div class="mt-g">
                            <div class="mt-k">中评(<span class="rate_m">0</span>%)</div>
                            <div class="mt-h"><div class="mt-h-w"></div></div>
                        </div>
                        
                        <div class="mt-g">
                            <div class="mt-k">差评(<span class="rate_b" >0</span>%)</div>
                            <div class="mt-h"><div class="mt-h-e"></div></div>
                        </div>
                    </div>
                </div>
                
            
                <div class="content">
                    <!--商品详情-->
                    <div class="g-ana g-d">
                    @foreach($match as $matchval)
                        <img src="{{$matchval}}">
                    @endforeach
                    </div>
                
                
                    <!--商品评价-->
                    <div class="g-ana g-p">
                        <div class="g-p-nav">
                            <ul>
                                <li><a style="background:#e4393c;color:#fff;" class="nav-list a-p" href="javascript:">全部评价({{count($comment)}})</a></li>
                
                            </ul>
                        </div>
                        
                        <div id="g-p-content">
                            <div class="w">
                                <div class="w-message">评价心得</div>
                                <div class="w-user">评论者</div>
                            </div>
                    
                            <!--全部评价-->
                            <div class="pj all-p" >
                                @foreach($comment as $com)
                                    <div class="all-p-details" style="border:1px solid #ccc;width:100%;">
                                        <!--评级内容-->
                                        <div class="a-p-x" style="text-indent:30px;">
                                            <ul>
                                                <li style="color:black;font-size:20px;">{{$com -> content}}</li>
                                                <li>评论时间:{{$com -> atime}}</li>
                                            </ul>
                                        </div>
                                        <!--评论人-->
                                        <div class="a-p-u" style="position:absolute;right:320px;">
                                            <p><span>{{$com -> uname}}</span></p>
                                        </div>
                                    </div>
                                @endforeach
                            </div>
                         
                        </div>
                                <!-- <div class="a_page">{$all_page}</div>   --> 
                    </div>
                            
                            <!--好评-->
                            
                    </div>
                </div>
            </div>
        </div>

        <div style="clear:both"></div>
        
        <!--footer START-->
        <div id="footer">
            <div class="w">
                <div class="otherinfo">
                    
                    <div class="links">
                    @foreach($link as $lk)
                            <a href="{{$lk -> url}}" target="_blank">{{$lk -> linkname}}</a><span>|</span>
                    @endforeach
                    </div>
                   
                    <div class="copyright">ICP经营许可证：<span>京ICP证XXXXXX号</span>
                    </div>
                </div>
            </div>
        </div><!--footer END-->
        <script type="text/javascript">
            $('.otherinfo .links span').last().remove();
            //=========显示分类框=======
            $('.dt').on('mouseover',function(){
                $('.dd').css('display','block');
            });
            $('.dd-content').on('mouseover',function(){
                $('.dd').css('display','block');
            });
            $('#categorys').on('mouseover',function(){
                $('.dd').css('display','block');
            })

            $('.dd').on('mouseout',function(){
                $(this).css('display','none');
            })
            $('.dt').on('mouseout',function(){
                $('.dd').css('display','none');
            })

        </script>
        <script type="text/javascript">
        
        //==========好评率==============
        var w = $(".rate_w").html();
        wid = w/100 * 380 + "px";
        $(".mt-h-q").css("width",wid);
        //==========中评率==============
        var m = $(".rate_m").html();
        mid = m/100 * 380 + "px";
        $(".mt-h-w").css("width",mid);
        //==========中评率==============
        var b = $(".rate_b").html();
        bid = b/100 * 380 + "px";
        $(".mt-h-e").css("width",bid);
        
        
        
        //=======评论回复框=========
        $(".review_btn").click(function(){
            $(this).parents(".a-p-x").siblings(".review_box").slideToggle(300);
        });

        //点击回复时获取到回复的内容
        $(".review_box2").click(function(){
            var message = $(this).prev().children(".review_area").val();
            if(!message==""){
                $(this).parent(".review_box").slideUp(300);
                //获取到评论id
                var review_id = $(this).next().html();
                $.ajax({
                    'url':"__CONTROLLER__/review",
                    'type':"post",
                    'async':true,
                    'dataType':'json',
                    'data':{'message':message,"review_id":review_id},
                    'success':function(data){
                        
                        //alert(data);
                    }
                });
            }
        });

        




       //大小图转换
        $(".turn-img").hover(function(){
            //得到小图的 src
            var s = $(this).attr("src");
            //得到大图的 src
            var b = $(this).parents(".preview-simg").prev().children().attr("src");
            //alert(b);
            $(this).parents(".preview-simg").prev().children().attr({"src":s});
        });
        
        
        
        //======商品数量 加1 减1 ========
        $(".buy-num").keyup(function(){
            if($(this).val()!=""){
                var a = parseInt($(this).val());
                if(!a){
                    $(this).val(1);
                }else{
                    $(this).val(a);
                }
            }
        });
        
        $(".add").click(function(){
            if($(this).parent().prev().val() == ""){
                $(this).parent().prev().val(1);
            }else{
                var s = parseInt($(this).parent().prev().val()) + 1;
                $(this).parent().prev().val(s);
            }
            
        });
        
        $(".desc").click(function(){
            
            if($(this).parent().prev().val()==""){
                $(this).parent().prev().val(1);
            }else{
                var s = parseInt($(this).parent().prev().val()) - 1;
                if(s <= 0){
                    $(this).parent().prev().val(1);
                }else{
                    $(this).parent().prev().val(s);
                }
            }   
        });
        
        //==============颜色==============
        $(".c-c").click(function(){
    
            $(this).siblings().css({"border-color":"#ccc","background":"#fff","color":"#000"});
            $(this).css({"border-color":"#e4393c","background":"#e4393c","color":"#fff"});
            $(this).siblings().removeProp("id");
            $(this).prop({"id":"check-color"});
            
        });
        
        
        //=============尺寸================
        $(".c-s").click(function(){
            $(this).siblings().css({"border-color":"#ccc","background":"#fff","color":"#000"});
            $(this).css({"border-color":"#e4393c","background":"#e4393c","color":"#fff"});
            $(this).siblings().removeProp("id");
            $(this).prop({"id":"check-size"});
        });
        
        
        //=================加入购物车===========================
        $(".add-car").click(function(){
            var color = $(".color_value input:checked").val();
            var size = $(".size_value input:checked").val();
            var buy_num = $(".buy-num").val();
            var goods_id = $(".goods_id").val();
             var goods_name = $(".goods_name").val();
            //alert(goods_name);
            var goods_psn = $(".preview-n").children("span").html();
            $.ajax({
                url:"__CONTROLLER__/add_car",
                type:"post",
                async:true,
                dataType:"json",
                data:{'psn':goods_psn,'color':color,'size':size,'num':buy_num,'goods_id':goods_id,'goods_name':goods_name},
                success:function(data){
                    if(data.info == 1){
                        if(!confirm('请先登录！')){
                            return false;
                        }
                        window.location.href="__APP__/Login/login";
                        return;
                    }
                    alert(data.info);
                    window.location.reload();
                }
            });
        
        });
        
        //============商品库存量查询==============================
        $("input").click(function(){
            var goods_id = $(".goods_id").val();
            var attrvalue_id ="";
            if($(".color_value input:checked").val()){
                 attrvalue_id += $(".color_value input:checked").val() +",";
            }
            
            if($(".size_value input:checked").val()){
                 attrvalue_id += $(".size_value input:checked").val();
            }
            
            $.ajax({
                url:"__CONTROLLER__/check_stock",
                type:"post",
                dataType:"json",
                async:true,
                data:{'attrvalue_id':attrvalue_id,"goods_id":goods_id},
                success:function(data){
                    //alert(data);
                    $("#stock").html(data);
                }
            
            });
        });
        
        
        
        
        
        
        //======自定义函数======    
        function g_show(aobj,bobj){
            $(".ana").css({"background":"#f2f2f2","color":"#666"});
            $(".g-ana").css("display","none");
            aobj.css({"background":"#e4393c","color":"#fff"});
            bobj.css("display","block");
        }
        
        $(".goods-d").hover(function(){g_show($(".goods-d"),$(".g-d"));});
        //$(".goods-p").hover(function(){g_show($(".goods-p"),$(".g-p"));});
        
        $(".goods-p").hover(function(){
            $(".ana").css({"background":"#f2f2f2","color":"#666"});
            $(this).css({"background":"#e4393c","color":"#fff"});
            $(".g-d").css('display',"none");
            $(".g-p").css('display',"block");
        });
        
        
        
    
        //======评价=============
        
        function p_show(aobj,bobj){
            $(".nav-list").css({"background":"#f2f2f2","color":"#666"});
            $(".pj").css("display","none");
            aobj.css({"background":"#e4393c","color":"#fff"});
            bobj.css("display","block");
        }
        $(".a-p").hover(function(){p_show($(".a-p"),$(".all-p"));});
        $(".g-pj").hover(function(){p_show($(".g-pj"),$(".good-p"));});
        $(".m-p").hover(function(){p_show($(".m-p"),$(".mid-p"));});
        $(".b-p").hover(function(){p_show($(".b-p"),$(".bad-p"));});
    
    
        </script>
        
    </body>
 </html>
